Looping through incoming linkd

I am attempting to loop through incoming links object by object
for an opened module. I collect the link module name for the incoming
links of interest from the user via GUI. I also get whatever view name
they want to use (which I know contains objects with incoming links).

Here's the deal. I know for a fact there are incoming links for each object
but DOORS is blowing right through and not entering the loop.


Link lnk
Object o //current, input to this function, processLinks
string linkMod // as chose by the user from the GUI
for lnk in o<-linkMod do {
....
}


Here's the kicker: this was working last week. Why am I not getting
into this loop when incoming links exist?

I know I may not be clear enough in my explanation. Please let me
know if I need to elaborate.

Thanks,
Tara
tlwtheq - Wed May 11 13:11:59 EDT 2011

Re: Looping through incoming linkd
llandale - Wed May 11 14:48:42 EDT 2011

You cannot see a "Link" unless the source module is open. It worked last week because that other module was already open, even if invisible. Code that deals with incoming Links generally must first open the othe modules. You can find those other modules with an incoming "LinkRef" loop, and example is in the module. Get the link ref, determine the ModName_ of the incoming link, and if its not open then open it. Following the LinkRef loop you then have your standard incoming Link loop.

  • Louie

Re: Looping through incoming linkd
tlwtheq - Wed May 11 14:54:38 EDT 2011

llandale - Wed May 11 14:48:42 EDT 2011
You cannot see a "Link" unless the source module is open. It worked last week because that other module was already open, even if invisible. Code that deals with incoming Links generally must first open the othe modules. You can find those other modules with an incoming "LinkRef" loop, and example is in the module. Get the link ref, determine the ModName_ of the incoming link, and if its not open then open it. Following the LinkRef loop you then have your standard incoming Link loop.

  • Louie

You're probably right Louie. As I just explained to Ron this is
a (recently) modified tried and true script. It's entirely possible
I zapped a load statement in the edit process.

Re: Looping through incoming linkd
SystemAdmin - Thu May 12 07:47:32 EDT 2011

First we need to understand how to follow a link (in-links and out-links behave differently).

For following in-links we need to use LinkRef & Link. Where are for outlinks only Link is enough.....

The attached script will help you loading objects from in-linked modules.

Regards,
Naveen
Attachments

attachment_14616059_Get_source_object_of_in-linked_module.txt

Re: Looping through incoming linkd
tlwtheq - Thu May 12 08:29:34 EDT 2011

Good tips from several sources.